import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import Front from '@/views/Front'
import My from '@/views/My'
import Class from '@/views/Class'
import Order from '@/views/Order'
import NotFound from '@/views/NotFound'
import Like from '@/views/Second/Like'
import Work from '@/views/Second/Work'
Vue.use(VueRouter)
Vue.config.productionTip = false
const routes = [
  {
    path:'/',
    redirect: '/front'
  },
  {
    path: "/front",
    component: Front
  },
  {
    path: "/my",
    component: My,
    children:[
      {
        path:'like',
        component: Like
      },
      {
        path:'work',
        component: Work
      }
    ]
  },
  {
    path: "/class",
    component: Class
  },
  {
    path: "/order",
    component: Order
  },
  {
    path:'*',
    component:NotFound
  }
]
const router = new VueRouter({
  routes
})
new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
